--------------------------------------------------------
--  DDL for Procedure SETUPCOMPONENT
--------------------------------------------------------
set define off;

  CREATE OR REPLACE PROCEDURE "SETUPCOMPONENT" (id_in number, userid_in varchar2)
 as
 
 procedure doInsert(id_in number, userid_in varchar2, comptype_in varchar2)
 as
 begin
 insert into PCR_COMPONENT(PCRCID,PCRID,COMPONENT_CODE,EXISTING_VALUE,EXISTING_FY,PROPOSED_VALUE,PROPOSED_FY,CHANGE_VALUE,
                           CHANGE_PCT,CHANGE_YEARS,CREATE_DT,OWNER,LAST_MOD_DT,EDIT_USERID,DEL_FLAG_YN) values
                           (PCR_SEQ.nextval,id_in, comptype_in,0,GET_CURRENT_FY,0,GET_CURRENT_FY,0,0,0,SYSdate,userid_in,SYSdate,userid_in,'N');
 end;
begin
doInsert(id_in, userid_in , 'PA'||chr(38)||'ED Support');
doInsert(id_in, userid_in , 'PS'||chr(38)||'E Support');
doInsert(id_in, userid_in , 'R/W Support');
doInsert(id_in, userid_in , 'Con Support');
doInsert(id_in, userid_in , 'R/W Capital');
doInsert(id_in, userid_in , 'Con Capital');
 
 
 end;
